Skip to content

Make Agent return an Iterator#10

Merged
christopherwoodall merged 17 commits intomainfrom
seperation-of-concerns
Jul 18, 2025
Merged

Make Agent return an Iterator#10
christopherwoodall merged 17 commits intomainfrom
seperation-of-concerns

Conversation

@christopherwoodall
Copy link
Copy Markdown
Owner

No description provided.

This comment was marked as outdated.

christopherwoodall and others added 4 commits July 18, 2025 11:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the Agent to return an Iterator yielding AgentEvent objects instead of directly returning a final result, enabling real-time monitoring of agent execution progress and improved event handling.

  • Introduces an event-driven architecture with AgentEventType enum and AgentEvent dataclass for structured event communication
  • Transforms the CodeAgent.run() method to yield AgentEvent objects at each step of execution (iteration start, tool calls, results, completion)
  • Updates the CLI entrypoint to handle the new iterator-based approach with improved event processing and error handling

Reviewed Changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/source_agent/heavy.py Completely removed - eliminates heavy agent functionality
src/source_agent/entrypoint.py Major refactor to handle iterator-based agent events with new event handler and improved interactive mode
src/source_agent/agents/code.py Core refactor to return Iterator[AgentEvent] instead of direct results, with comprehensive event types and improved error handling
pyproject.toml Version bump and removal of heavy-agent script reference
config.yaml Completely removed - eliminates orchestrator configuration
.github/README.md Documentation updates to reflect new architecture and installation instructions

@christopherwoodall christopherwoodall merged commit 8435f45 into main Jul 18, 2025
1 check passed
@christopherwoodall christopherwoodall deleted the seperation-of-concerns branch July 18, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants